package PAT;

import java.util.Scanner;

public class PAT1008 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ans = n *5;
        int temp = 0;
        while (n-->0){
            int a = scanner.nextInt();
            int p = a- temp;
            if(p >0 ){
                ans += p*6;
            }else{
                ans -= p*4;
            }
            temp = a;
        }
        System.out.println(ans);
    }
}
